<?php
class Group_model extends CI_Model
{
    public function __construct()
    {
        parent::__construct();
        $this->load->database();
    }

    public function getGroupsList()
    {
        $groups = $this->db->get('groups')->result();
        return $groups;
    }

    public function updateGroup($id, $data)
    {
        $this->db->where('id', $id);
        $this->db->update('groups', $data);
    }
}